<template>
	<el-col :span="options.span || 22"  v-if="showItem">
		<el-form-item :label-width="options.labelWidth" :label="options.label" :prop="options.prop">
			<el-input-number v-on="$listeners" v-bind="$attrs"  :min="options.min || 0" :max="options.max" style="width:100%;" :controls="options.controls || false"
				:placeholder="options.placeholder" :disabled="options.disabled || false" :type="options.type" v-model="inputVal">
			</el-input-number>
      <div v-if="options.tip" class=" xc-c-666 xc-text-12">
       * {{options.tip}}
      </div>
		</el-form-item>
	</el-col>
</template>

<script>
	export default {
		props: {
			value: [String, Number],
			options: {
				type: Object,
				default () {
					return {
						span: 22,
					};
				},
			},
		},
		inject:['vm'],
		computed: {
			inputVal: {
				get: function() {
					return this.value;
				},
				set: function(e) {
					this.$emit("input", e);
				},
			},
			showItem() {
				if (this.options.show) return this.options.show(this.vm)
				return true;
			}
		},
		methods:{
		}
	};
</script>

<style>
</style>